package com.code.day06;

public class Dome04Object {
    public static void main(String[] args) {
        Dome02 dome02 = new Dome02();
        System.out.println(dome02);
        dome02.brand = "华为";
        dome02.price = 9999;


        System.out.println("========");
/*
  调用同一个类名  可以new不同的对象使用同一个类的方法 这两者之间并不会互相影响
  会影响的条件是将dome02赋值给dome03这样就会影响
*/

//        Dome02 dome03 = dome02;
      Dome02 dome03 = new Dome02();
        System.out.println(dome03);
        dome03.brand = "苹果";
        dome03.price = 12000;
        System.out.println(dome02.brand);
        System.out.println(dome02.price);
        System.out.println(dome03.brand);
        System.out.println(dome03.price);


        System.out.println("======");

        

    }
}
